home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / interp / class.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-15  |  2.2 KB  |  68 lines  |  [TEXT/ttxt]

  1. /**********************************************************************\
  2. *
  3. *  Copyright (c) 1994  Carnegie Mellon University
  4. *  All rights reserved.
  5. *  
  6. *  Use and copying of this software and preparation of derivative
  7. *  works based on this software are permitted, including commercial
  8. *  use, provided that the following conditions are observed:
  9. *  
  10. *  1. This copyright notice must be retained in full on any copies
  11. *     and on appropriate parts of any derivative works.
  12. *  2. Documentation (paper or online) accompanying any system that
  13. *     incorporates this software, or any part of it, must acknowledge
  14. *     the contribution of the Gwydion Project at Carnegie Mellon
  15. *     University.
  16. *  
  17. *  This software is made available "as is".  Neither the authors nor
  18. *  Carnegie Mellon University make any warranty about the software,
  19. *  its performance, or its conformity to any specification.
  20. *  
  21. *  Bug reports, questions, comments, and suggestions should be sent by
  22. *  E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  23. *
  24. ***********************************************************************
  25. *
  26. * $Header: class.h,v 1.9 94/11/06 19:59:21 rgs Exp $
  27. *
  28. \**********************************************************************/
  29.  
  30. /* If this enumeration changes, you must also update "type.h" */
  31. #ifndef type_Id_defined
  32. #define type_Id_defined
  33. enum type_Id {
  34.     id_Singleton, id_Class, id_SubClass, id_LimFixnum, id_LimBignum,
  35.     id_Union, id_NoneOf
  36. };
  37. #endif
  38.  
  39. extern obj_t obj_ClassClass;
  40. extern obj_t obj_StaticTypeClass; /* type of static pointer classes */
  41.  
  42. struct class {
  43.     obj_t class;
  44.     enum type_Id type_id;
  45.     boolean abstract_p;
  46.     boolean sealed_p;
  47.     struct library *library;
  48.     int (*scavenge)(struct object *ptr);
  49.     obj_t (*transport)(obj_t object);
  50.     void (*print)(obj_t object);
  51.     obj_t debug_name;
  52.     obj_t superclasses;
  53.     obj_t cpl;
  54.     obj_t direct_subclasses;
  55.     obj_t all_subclasses;
  56. };
  57.  
  58. #define CLASS(o) obj_ptr(struct class *, o)
  59.  
  60. extern obj_t make_abstract_class(boolean sealed_p);
  61. extern obj_t make_builtin_class(int (*scavenge)(struct object *ptr),
  62.                 obj_t (*transport)(obj_t object));
  63.  
  64. extern void init_builtin_class _ANSI_ARGS_((obj_t class, char *debug_name, ...));
  65.  
  66. extern void setup_class_supers(obj_t class, obj_t supers);
  67.  
  68.